/*
 * @Author: xiaosihan
 * @Date: 2021-05-29 17:50:06
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2021-11-07 12:25:47
 */

import { LoadingManager, TextureLoader, WebGLRenderer } from "three";
import { FBXLoader } from "three/examples/jsm/loaders/FBXLoader.js";
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js";
import { OBJLoader } from "three/examples/jsm/loaders/OBJLoader.js";
import TitleDomControl from "../components/TitleDom/TitleDomController.js";
import THREEInstancedMesh from "../InstancedMesh/THREEInstancedMesh.js";
import Object3D from "../Object3D/Object3D";
import Composer from "./composer/Composer";
import Emit from "./Emit";

export type ReactThreeContextType = {
    dev: boolean,
    emiter: Emit,
    parent: Object3D,
    scene: THREE.Scene,
    camera: THREE.PerspectiveCamera,
    renderer: WebGLRenderer,
    collideCubeInstanceMesh: THREEInstancedMesh, // 碰撞检测专用的实例模型
    collideCylindricalInstanceMesh: THREEInstancedMesh, // 碰撞检测专用的实例模型
    collidePlaneInstanceMesh: THREEInstancedMesh, // 碰撞检测专用的实例模型
    instancedMeshParent?: THREEInstancedMesh, // 实例模型的父元素
    composer: Composer,
    audioListener?: AudioListener,
    mouseEventMesh: Object3D[],
    loadingManager: LoadingManager,
    objLoader: OBJLoader,
    fbxLoader: FBXLoader,
    gltfLoader: GLTFLoader,
    textureLoader: TextureLoader,
    TitleDomController: TitleDomControl,
}

// object3d 对象上面的监听的事件
export enum Object3DEvent {
    BEFORE_RENDER = "before_Render",
    AFTER_RENDER = "after_Render",
}
